<?php
/**
 * Handler File Class
 *
 * @author liliang <liliang@wolive.cc>
 * @email liliang@wolive.cc
 * @date 2017/06/01
 */

namespace app\manager\controller;

use think\Controller;
use app\admin\model\Admins;

/**
 * 基础验证是否登录.
 */
class Base extends Controller
{

    /**
     * 验证session.
     *
     * @return void
     */
    public function _initialize()
    { 


        if($_SESSION['Msg']['level'] != 0){
        	$this->error('您不是超级用户!');
        }

        $login = $_SESSION['Msg'];
        $result = Admins::table("wolive_service")->where('service_id', $login['service_id'])->find();
        $this->assign('arr', $result);
    }

}
